<?php

namespace App\Http\Controllers;

use App\Service\Customer\CustomerService;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    /**
     * 获得推送扩展的昵称和头像
     * @param $uid
     * @return array
     */
    public static function getSendExt($uid)
    {
        $sysuser_info = CustomerService::findUser(['uid'=>$uid]);
        $ext = array(
            'nickname' => $sysuser_info->nickname,
            'headimgurl' => $sysuser_info->headimgurl
        );
        return $ext;
    }
}
